#include "SymbolType.hpp"

SymbolType::SymbolType(Type * t){
	this->t = t;
	this->symbolId = SYMBOL_TYPE;
}

SymbolType::SymbolType(){
	this->t = NULL;
	this->symbolId = SYMBOL_TYPE;
}
SymbolType::~SymbolType(){
	if(t!=NULL)
		delete t;
}
	
void SymbolType::show(){
	std::cout << "type    \t" ;
	std::cout << "type:" ;
	t->show();
}

SymbolValEnum::SymbolValEnum(TypeEnum * t, int pos){
	this->t = t;
	this->position = pos;
}
SymbolValEnum::~SymbolValEnum(){
	//delete t;
}
void SymbolValEnum::show(){
	std::cout << "enumeration    \t" ;
	std::cout << "valeur:" ;
	((TypeEnum*)t)->showElem(this->position);
}
